<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="utf8"%>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Users</title>
	<link rel="stylesheet" href="css/mystyle.css" type="text/css"/>
	<link rel="stylesheet" href="css/jquery-ui-1.8.11.custom.css" type="text/css"/>
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/jquery.validate.js"></script>
	<script type="text/javascript" src="js/jquery-ui-1.8.11.custom.min.js"></script>
	<script type="text/javascript" src="js/myscript.js"></script>
</head>
<body>
<a href="<c:url value="?lang=en"/>">en</a>
<a href="<c:url value="?lang=ru"/> ">ru</a>
<br>


	<h2>
		<spring:message code="label.registration" />
	</h2>

	<form:form id="registerForm" method="post" action="register/submit.htm" commandName="user" >
		<table>
			<tr>
				<td><form:label path="name">
						<spring:message code="data.user.name"/>
						<label class="red">*</label>
					</form:label>
				</td>
				<td>
					<form:input id="name" path="name" />
				</td>
				<td ><form:errors path="name"  class="errorLabel"/></td>
			</tr>
			<tr>
				<td>
					<form:label path="surname">
						<spring:message code="data.user.surname"/>
						<label class="red">*</label>
					</form:label>
				</td>
				<td>
					<form:input id="surname" path="surname" />
				</td>
				<td ><form:errors path="surname"   class="errorLabel"/></td>
			</tr>
			<tr>
				<td><form:label path="country.id">
						<spring:message code="data.country.country"/>
				</form:label>
				</td>
				<td><form:select id="country" path="country.id">
						<option></option>
						<form:options items="${countries}" itemValue="id"  itemLabel="name" />
					</form:select>
				</td>
				<td><label id="countryError" class="errorLabel"></label></td>
			</tr>
			<tr>
				<td>
					<form:label path="birthsday">
						<spring:message code="data.user.birthsday"/>
						<label class="red">*</label>
					</form:label>
				</td>
				<td>
					<form:input id="birthsday" path="birthsday" />
				</td>
				<td ><form:errors path="birthsday"  class="errorLabel"/></td>
			</tr>
			
			 <tr>
			   	<td >
			   		<spring:message code="data.user.email"/>
					<label class="red">*</label>
				</td>
			   	<td>
			   		<form:input id="email" path="email" />
			   		<input id="sub" type="button" value="<spring:message code="label.check"/>" />
			   	</td>
			   	<td><label id="emailResults" class="errorLabel"></label></td>
			 </tr>
 			
			<tr>
				<td>
					<form:label path="password">
						<spring:message code="data.user.password"/>
						<label class="red">*</label>
					</form:label>
				</td>
				<td><form:input id="password" type="password" path="password" /></td>
				<td ><form:errors path="password"   class="errorLabel"/></td>
			</tr>
			<tr>
				<td> 
					<label>	<spring:message code="data.user.retypePassword"/></label>
					<label class="red">*</label>
				</td>
				<td><input id="password2" type="password" /></td>
				<td ><label id="password2Error"  class="errorLabel"></label></td>
			</tr>
			<tr>
				<td><input id="submit" type="submit" value="<spring:message code="label.register"/>" /></td>
				<td ></td>
			</tr>
		</table>
	</form:form>

</body>
</html>













